Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Image Transcoding Functions

ImageTranscodeSequenceBegin

Initiates an image transcoder sequence operation.

pascal OSErr ImageTranscodeSequenceBegin (
                     ImageTranscodeSequence *its,
                     ImageDescriptionHandle srcDesc,
                     OSType destType,
                     ImageDescriptionHandle *dstDesc
                     void *data,
                     long dataSize);
its
The image transcoder sequence identifier. If the operation fails, the value pointed to by its is set to nil .

srcDesc
The image description for the source compressed image data.

destType
The desired compression format into which to transcode the source data.

dstDesc
Returns an image description for the data which will be generated by the image transcoding sequence.

data
Pointer to first frame of compressed data to transcode. Set to nil of not available.

dataSize
Size of the compressed data, in bytes. Set to zero if no data is provided.

DISCUSSION

This function begins an image transcoder sequence operation and returns the sequence identifier in the its parameter. The caller is responsible for disposing of the image description that is returned in the dstDesc parameter. If no transcoder is available to perform the requested transcoding operation, a handlerNotFound error is returned.

ImageTranscodeFrame

Transcodes a frame of image data.

pascal OSErr ImageTranscodeFrame (
                     ImageTranscodeSequence its,
                     void *srcData,
                     long srcDataSize,
                     void **dstData,
                     long *dstDataSize);
its
Specifies the image transcoder sequence to use to perform the transcoding operation.

srcData
Contains a pointer to the source data to transcode.

srcDataSize
Indicates the size of the compressed source image data in bytes.

dstData
Returns a pointer to the transcoded image data.

dstDataSize
Returns the size of the transcoded image data.

DISCUSSION

After creating the image transcoder sequence using ImageTranscodeSequenceBegin , you use the ImageTranscodeFrame function to transcode a frame of image data. The caller is responsible for disposing of the transcoded data using the ImageTranscodeDisposeFrameData function.

ImageTranscodeDisposeFrameData

Disposes transcoded image data.

pascal OSErr ImageTranscodeDisposeFrameData(
                     ImageTranscodeSequence its,
                     void *dstData)
its
Specifies the image transcoder sequence that was used to generate the transcoded data.

dstData
Contains a pointer to the transcoded image data generated by the ImageTranscodeFrame function.

DISCUSSION

When the transcoded image data returned by ImageTranscodeFrame is no longer needed, use the ImageTranscodeDisposeFrameData function to dispose of the data. Only the image transcoder that generated the data can properly dispose of it.

ImageTranscodeSequenceEnd

Ends an image transcoder sequence operation.

The only parameter to ImageTranscodeSequenceEnd is the identifier of the image transcoder sequence to dispose. It is safe to pass a value of 0 to this routine.

pascal OSErr ImageTranscodeSequenceEnd (ImageTranscodeSequence its)
its
The identifier of the image transcoder sequence to dispose. It is safe to pass a value of 0 in this parameter.

DISCUSSION

You must call this function to terminate an image transcoder sequence operation and dispose of the sequence.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |